Author: E.Chin Purpose: Compare ASA and FFQ lactose. Will help guide how much FFQ analysis to do.
## [1] 346 15
## [1] 286 15
## [1] "SubjectID" "LCT" "LNP" "Ethnicity" "age"
## [6] "sex" "ht_cm" "weightv2" "bmi_final" "bin_number"
## [11] "age_cat" "bmi_cat" "d_total" "lacs" "dt_kcal"
## [1] "SubjectID" "LCT" "LNP" "Ethnicity"
## [5] "age" "sex" "ht_cm" "weightv2"
## [9] "bmi_final" "bin_number" "age_cat" "bmi_cat"
## [13] "Lactose.consumed" "D_TOTAL" "KCAL"
283 subjects have both FFQ and ASA24 data
#who overlaps
gplots::venn(list("n FFQ subjects" = ffq$SubjectID, "n ASA subjects" = asa$SubjectID))
## [1] "SubjectID" "LCT" "LNP" "Ethnicity"
## [5] "age" "sex" "ht_cm" "weightv2"
## [9] "bmi_final" "bin_number" "age_cat" "bmi_cat"
## [13] "d_total" "lacs" "dt_kcal" "Lactose.consumed"
## [17] "D_TOTAL" "KCAL"
Plot of FFQ lactose (lacs) and ASA24 lactose (Lactose.consumed).
Color corresponds to LP status, size with bmi_final, and shape corresponds to sex (1 = Male, 2 = Female). Hover over the dots for more metadata info.
plot_ly(df, x = ~lacs, y = ~Lactose.consumed,
color = ~LNP, symbol = ~factor(sex), size = ~bmi_final,
text = ~paste("SubjectID: ", SubjectID,
"<br>Ethnicity: ", Ethnicity,
"<br>LCT: ", LCT))
cor.test(df$lacs, df$Lactose.consumed, method = "pearson", alternative = "two.sided")
##
## Pearson's product-moment correlation
##
## data: df$lacs and df$Lactose.consumed
## t = 9.154, df = 281, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.3841476 0.5643387
## sample estimates:
## cor
## 0.4792779
Plot of FFQ total dairy (d_total, x axis) and ASA24 total dairy (D_TOTAL, y axis).
Color corresponds to LP status, size with bmi_final, and shape corresponds to sex (1 = Male, 2 = Female). Hover over the dots for more metadata info.
plot_ly(df, x = ~d_total, y = ~D_TOTAL,
color = ~LNP, symbol = ~factor(sex), size = ~bmi_final,
text = ~paste("SubjectID: ", SubjectID,
"<br>Ethnicity: ", Ethnicity,
"<br>LCT: ", LCT))
cor.test(df$d_total, df$D_TOTAL, method = "pearson", alternative = "two.sided")
##
## Pearson's product-moment correlation
##
## data: df$d_total and df$D_TOTAL
## t = 9.2523, df = 281, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.3885195 0.5678309
## sample estimates:
## cor
## 0.4832267
Plot of FFQ total intake (dt_kcal, x axis) and ASA24 total intake (KCAL, y axis).
Color corresponds to LP status, size with bmi_final, and shape corresponds to sex (1 = Male, 2 = Female). Hover over the dots for more metadata info.
plot_ly(df, x = ~dt_kcal, y = ~KCAL,
color = ~LNP, symbol = ~factor(sex), size = ~bmi_final,
text = ~paste("SubjectID: ", SubjectID,
"<br>Ethnicity: ", Ethnicity,
"<br>LCT: ", LCT))
cor.test(df$dt_kcal, df$KCAL, method = "pearson", alternative = "two.sided")
##
## Pearson's product-moment correlation
##
## data: df$dt_kcal and df$KCAL
## t = 8.8866, df = 281, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.3721096 0.5546898
## sample estimates:
## cor
## 0.4683853
Plot of FFQ total dairy (d_total, x axis) and FFQ lactose (lacs, y axis).
Color corresponds to LP status, size with bmi_final, and shape corresponds to sex (1 = Male, 2 = Female). Hover over the dots for more metadata info.
plot_ly(df, x = ~d_total, y = ~lacs,
color = ~LNP, symbol = ~factor(sex), size = ~bmi_final,
text = ~paste("SubjectID: ", SubjectID,
"<br>Ethnicity: ", Ethnicity,
"<br>LCT: ", LCT))
cor.test(df$d_total, df$lacs, method = "pearson", alternative = "two.sided")
##
## Pearson's product-moment correlation
##
## data: df$d_total and df$lacs
## t = 27.707, df = 344, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.7952342 0.8609924
## sample estimates:
## cor
## 0.830994